# Why patches

Textadept is incredibly short, in terms of source size. The project is committed to keep it under 2000 lines. So there are some features missing. Implementing those features would require to change source code and compile.

This is optional. I will try to keep this project in such a way that it would work without these patches (would run without certain features).

# How to apply patch and compile

[Compiling](https://foicica.com/textadept/manual.html#Compiling) Textadept from source is very easy and fast, given that the codebase is so tiny.

<span>1.</span> Download the source from [https://github.com/rgieseke/textadept/releases](GitHub) or from [Textadept website](https://foicica.com/hg/textadept). In case you want the latest release version from Textadept website, go under __tags__ and choose a non-beta version, click __files__ beside it, then click __zip__.
<span>2.</span> Copy the patch file to the main source directory (the same directory where the `src` folder is.)
<span>3.</span> Open a terminal on that directory and run:

```
patch -p2 -i changes.patch
```

<span>4.</span> Install dependencies:

__On Arch Linux__

```
sudo pacman -S autoconf automake gettext libtool clang gtk2
```

__On Debian__

```
sudo apt install automake gettext libtool clang libgtk2.0-dev
```

<span>5.</span> Open the terminal on `src` directory and run:

```
make clean-deps
make deps
make
sudo make install
```

This should install the patched version of Textadept with the extra features.